# set project_path /home/wj/tmp/project_1
# set device_type xc7z100ffg900-2
# set project_name main
#
# vivado的tcl窗口里运行
# source /path/demo_generate_dcp.tcl
#
# 或者终端里运行
# vivado -source /home/wj/vimrc/linux_config/creat_project_from_gui.tcl
#
# project_path
# device_type: xc7z100ffg900-2


set project_path /home/wj/tmp/use_dcp
set device_type xc7z100ffg900-2
set project_name main


if {[file exists $project_path]} {
    # 删除目录
    file delete -force $project_path
    puts "目录已成功删除。"
}

# 创建工程
create_project $project_name $project_path -part $device_type

# 设置仿真库
set_property compxlib.questa_compiled_library_dir /home/wj/program/vivado2018.3_questasim_2021.2_1_lib [current_project]

#  # 添加源文件
add_files [ glob /home/wj/study/hdl_example/common/uart/*.v ]
add_files /home/wj/study/hdl_example/common/fifo/StreamFifo8x2048.v
remove_files  {/home/wj/study/hdl_example/common/uart/uart.v /home/wj/study/hdl_example/common/uart/tx_part.v /home/wj/study/hdl_example/common/uart/rx_part.v}
add_files /home/wj/tmp/project_1/main.runs/synth_1/uart.dcp

# launch_runs synth_1

